package com.platform.dbs.model;

import com.google.common.collect.Lists;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.NonNull;
import lombok.RequiredArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * Description: Database Table defined
 *
 * @author wxw created on 2019/9/20
 */
@NoArgsConstructor
@RequiredArgsConstructor
@Data
public class DbTable implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 表名
     */
    @NonNull
    private String name;

    /**
     * 主体信息
     */
    private boolean ztxx;

    /**
     * 注释
     */
    private String comment;

    /**
     * 字段
     */
    private List<DbColumn> cols = Lists.newArrayList();

    public void addCol(DbColumn column) {
        this.cols.add(column);
    }
}
